import request from '@/utils/request'

// 查询签字信息列表
export function listSign(query) {
    return request({
        url: '/spspublic/sign/list',
        method: 'get',
        params: query
    })
}

// 查询签字信息详细
export function getSign(ctId) {
    return request({
        url: '/spspublic/sign/' + ctId,
        method: 'get'
    })
}

// 新增签字信息
export function addSign(data) {
    return request({
        url: '/spspublic/sign',
        method: 'post',
        data: data
    })
}

// 修改签字信息
export function updateSign(data) {
    return request({
        url: '/spspublic/sign/edit',
        method: 'post',
        data: data
    })
}

// 删除签字信息
export function delSign(ctId) {
    return request({
        url: '/spspublic/sign/delete/' + ctId,
        method: 'post'
    })
}

// 导出签字信息
export function exportSign(query) {
    return request({
        url: '/spspublic/sign/export',
        method: 'get',
        params: query
    })
}

// 单据提交
export function submitTicket(data) {
    return request({
        url: '/spspublic/task/submitTicket',
        method: 'post',
        data: data
    })
}

// 单据签发
export function publish(data) {
    return request({
        url: '/spspublic/task/publish',
        method: 'post',
        data: data
    })
}

// 单据签发坚持
export function publishCheck(data) {
    return request({
        url: '/spspublic/task/publishCheck',
        method: 'post',
        data: data
    })
}

// 单据撤销
export function withdraw(data) {
    return request({
        url: '/spspublic/task/withdraw',
        method: 'post',
        data: data
    })
}

// 单据撤回
export function revoke(data) {
    return request({
        url: '/spspublic/task/revoke',
        method: 'post',
        data: data
    })
}


// 批量审批
export function batchSign(data) {
    return request({
        url: '/spspublic/sign/batchSign',
        method: 'post',
        data: data
    })
}
